package com.dream.xiaobo.service;

import com.dream.xiaobo.entity.Cart;

import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/9/1 - 9:40
 */
public interface CartService {

    //添加到购物车逻辑
    void createCart(Integer uId, String pId) throws IllegalAccessException, SQLException, InvocationTargetException;

    //查询购物车中商品的逻辑
    List<Cart> findAll(Integer uId) throws IllegalAccessException, SQLException, InvocationTargetException;

    //删除购物车逻辑
    void deleteCartByCid(String cId) throws SQLException;

    //修改购物车逻辑
    void updateCart(String cId, String cNum, String price) throws SQLException;

    //清空购物车逻辑
    void clearCart(String uId) throws SQLException;
}
